package com.fjec.gateway.sentinel;

import com.alibaba.csp.sentinel.adapter.gateway.zuul.fallback.BlockResponse;


public class MyBlockResponse extends BlockResponse {

    private Boolean success = Boolean.TRUE;

    public MyBlockResponse(boolean success, int code, String message, String route) {
        super(code, message, route);
        this.success = success;
    }

    public Boolean getSuccess() {
        return success;
    }

    @Override
    public String toString() {
        return "{" +
                "\"success\":" + getSuccess() +
                ", \"code\":" + getCode() +
                ", \"message\":" + "\"" + getMessage() + "\"" +
                ", \"route\":" + "\"" + getRoute() + "\"" +
                '}';
    }
}
